#include<func.h>
void* pthread_func(void *p)
{
    int *q=(int*)p;
    *q=5;
    printf("I am child thread\n");
}
int main()
{
    pthread_t phid;
    int a=10;
    int ret=pthread_create(&phid,NULL,pthread_func,&a);
    if(ret!=0)
    {
        printf("pthread_create failed\n");
        return -1;
    }
    usleep(1);
    printf("I am main thread\n");
    printf("a=%d\n",a);
    return 0;
}